using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using UnityEngine.UI;

public class PlayerStatesUI : MonoBehaviour
{
    public static PlayerStatesUI Instance{ private set; get;}
    
    public Text playerStatesText;
    
    // Start is called before the first frame update
    void Start()
    {
        Instance = this;
    }

    public void ShowPlayerStates(PlayerStates playerStatesNow,PlayerStates playerStatesMax)
    {
        playerStatesText.text = $"HP: {playerStatesNow.Hp}/{playerStatesMax.Hp}" +
                                $" MP: {playerStatesNow.Mp}/{playerStatesMax.Mp}" +
                                $"\n ATK:{playerStatesNow.Atk} Def:{playerStatesNow.Def}" +
                                $"\n暴击率:{playerStatesNow.暴击率 /10000f}%  闪避:{playerStatesNow.闪避/10000f}%";
    }
}